package com.zagj.videocomparess;

import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioTrack;
import android.util.Log;

/**
 * Created by Chen qin lang on 2018/6/13.
 */

public class EasyVideoPlay {
    static {
        System.loadLibrary("splayer");
    }

    private  CameraActivity cameraActivity;
    public void init(CameraActivity cameraActivity){
        this.cameraActivity=cameraActivity;
    }
    private AudioTrack audioTrack;

    public  native int play(String videoPath,Object surface);
    public  native int stop(String videoPath);

    public  void setFileSize(int fileSize,int i){
        Log.e( "setFileSize: %d", fileSize+"");
        cameraActivity.setProgressSize(fileSize);
    }

    public void realizeSize(int width,int height){
        Log.e("realizeSize: ", width+"--"+height+"");
        cameraActivity.realizeSize(width,height);

    }

}
